-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed chart crashing bug on enabling multiple shapes with multiple legends selected #33221
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Anush <[email protected]>
Co-authored-by: Anush <[email protected]>
…luentui into usr/atisjai/chartsV9
…luentui into usr/atisjai/chartsV9
@@ -184,7 +184,6 @@ export const LineChart: React.FunctionComponent<LineChartProps> = React.forwardR | |||
}, [props.height, props.width, props.data]); | |||
|
|||
function _injectIndexPropertyInLineChartData(lineChartData?: LineChartPoints[]): LineChartDataWithIndex[] | [] { | |||
const { allowMultipleShapesForPoints = false } = props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this change? Not using enable multiple shape prop anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowMultipleShapesForPoints is used as it is in _createLegends,_getBoxWidthOfShape,_getPath,_getPointFill functions. Within _injectIndexPropertyInLineChartData function, the index of the selection was earlier passed based on allowMultipleShapesForPoints prop. If allowMultipleShapesForPoints was true, index was passed as -1 which was causing the crash at _createLines function where it was getting index of point as -1.
Fixed chart crashing bug on enabling multiple shapes with multiple legends selected
[V9] [Doc site] when we select more than 3 legends and enable on multiple shapes getting an error as Cannot read properties of undefined.